<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>发光渐变边框</title>
    <style>
      .container {
        width: 100%;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 50px;
      }
      .container .box {
        position: relative;
        width: 280px;
        background-color: #fff;
        border-radius: 20px;
        aspect-ratio: 7/9; /* 宽高比 */
      }
      .container .box::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 20px;
      }
      .container .box::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 20px;
        filter: blur(90px);
      }
      .container .box b {
        position: absolute;
        display: block;
        inset: 4px;
        border-radius: 16px;
        background: rgba(0, 0, 0, 0.7);
        z-index: 2;
      }
      .container .box:nth-child(1)::before,
      .container .box:nth-child(1)::after {
        background: linear-gradient(45deg, #ff7e5f, #feb47b);
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="box"><b></b></div>
    </div>
  </body>
</html>
